#ifndef _REPLAYER_H_
#define _REPALYER_H_
#include <map>
#include <windows.h>

#define	SDL_EVENT_MSGTYPE_NULL		0
#define	SDL_EVENT_MSGTYPE_KEYBOARD	1
#define	SDL_EVENT_MSGTYPE_MOUSEKEY	2
#define SDL_EVENT_MSGTYPE_MOUSEMOTION	3
#define SDL_EVENT_MSGTYPE_MOUSEWHEEL	4


#ifdef WIN32
	#define	INVALID_KEY	0xffff
	typedef WORD	KeySym;		// map to Windows Virtual Keycode
	static int cxsize, cysize;	// for mapping mouse coordinates
#elif defined __APPLE__
	#define	INVALID_KEY	0xffff
	typedef	CGKeyCode KeySym;
#elif defined ANDROID
	#define	INVALID_KEY	0xffff
	typedef short	KeySym;
#else	// X11, has built-in KeySym
	#define	INVALID_KEY	0
	static Display *display = NULL;
	static int screenNumber = 0;
#endif

class Replay{


public:

#if SDL_VERSION_ATLEAST_2_0_0
	static KeySym SDLKeyToKeySym(int sdlkey);
	static std::map<int, KeySym> keymap;
#else
	static KeySym SDLKeyToKeySym(unsigned short sdlkey);
	static std::map<unsigned short, KeySym> keymap;
#endif

	static void SDLKeyToKeySym_init();

	static bool init;
};

#endif